<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

<f:view contentType="text/html;charset=UTF-8" encoding="UTF-8">
    <h:head>

    </h:head>

    <h:body>

        <h:form id="form">
            <p:messages id="message" showDetail="true"/>

            <p:commandButton id="confirm" value="Confirm" action="#{confirmDialog001.confirm}" update="message" styleClass="mr-2" icon="pi pi-check">
                <p:confirm header="Confirmation" message="Are you sure you want to proceed?" icon="pi pi-exclamation-triangle"/>
            </p:commandButton>

            <p:commandButton id="delete" value="Delete" action="#{confirmDialog001.delete}" update="message" styleClass="ui-button-danger mr-2" icon="pi pi-times">
                <p:confirm header="Confirmation" message="Do you want to delete this record?" icon="pi pi-info-circle"/>
            </p:commandButton>
            
            <p:commandButton id="nonAjax" value="Non-Ajax" action="#{confirmDialog001.nonAjax}" styleClass="ui-button-warning" icon="pi pi-question" ajax="false">
                <p:confirm header="Confirmation" message="Submit this page and reload?" icon="pi pi-question-circle"/>
            </p:commandButton>

            <p:confirmDialog id="confirmdialog" global="true" showEffect="fade" hideEffect="fade" responsive="true" width="350">
                <p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes"/>
                <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no ui-button-flat"/>
            </p:confirmDialog>
        </h:form>

    </h:body>
</f:view>

</html>